home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / faq / vol15n14.zip / DISASM3.BAT < prev    next >
DOS Batch File  |  1996-04-04  |  1KB  |  27 lines

  1. @echo %dbgd% off > %temp%.\ax}
  2.   if [%1]==[] for %%v in (echo goto:End) do %%v Syntax: %0 COMFileName[* [?]]
  3.   for %%v in (%1.com* %1!@{?) do call %0 )1st %%v
  4.   for %%v in (1st 2nd 3rd) do if [%1]==[)%%v] goto )%%v
  5.   if not exist %temp%.\{f} for %%v in (echo goto:End) do %%v File %1 not found.
  6.   del %temp%.\{f}
  7.   for %%v in (echo. echo.Done. echo. goto:End) do %%v
  8. :)1st   { Parse the file name.                  }
  9. > %temp%.\comparing.bat echo %0 )2nd %2 %%4
  10. > %temp%.\compari}.bat fc %2 *.
  11. > %temp%.\{f}          compari}
  12.  :)2nd  { Determine the length of the COM file. }
  13.   if not %2==%3.COM for %%v in (echo goto:End) do %%v %2 is not a COM file.
  14.                  echo Disassembling %2 into %3.LST.
  15. >>%temp%.\ax}    for %%v in (r q) do echo %%v
  16. < %temp%.\ax}    debug %2 | find "AX=" > %temp%.\ax}.bat
  17. > %temp%.\ax.bat echo %0 )3rd %2 %3 %%5
  18.                  %temp%.\ax}
  19.  :)3rd  { Disassemble the file.                 }
  20. >>%temp%.\ax}    for %%v in (u100l%4 q) do echo %%v
  21. > %3.lst         echo.  Disassembled File: %2
  22. >>%3.lst         echo.
  23. < %temp%.\ax}    debug %2 | find ":" >> %3.lst
  24.  :End
  25.   for %%v in (%temp%.\ax}.* %temp%.\ax.bat? %temp%.\compari*.bat) do del %%v
  26.  
  27.